﻿@model UserCondition
@Html.Extra()
@{
    Layout = "~/Views/Shared/OA/_Query.cshtml";
}
@section Keyword
{
    @Html.TextBoxFor(model => model.UserName, new { placeholder = "搜索用户名", title = "搜索用户名" })
}
@section Advance
{
    <table>
        <tr>
            <th>
                @Html.LabelFor(model => model.UserName, "用户名")
            </th>
            <td>
                @Html.MyNet().TextBoxFor(model => model.UserName)
            </td>
        </tr>
        <tr>
            <th>
                @Html.LabelFor(model => model.Name, "姓名")
            </th>
            <td>
                @Html.MyNet().TextBoxFor(model => model.Name)
            </td>
        </tr>
        <tr>
            <th>
                @Html.LabelFor(model => model.IsLockout, "是是否锁定")
            </th>
            <td>
                @Html.MyNet().DropDownListFor(model => model.IsLockout,
                    new[]
                    {
                        new { Value = true, Name = "锁定"},
                        new { Value = false, Name = "未锁定"},
                    }, "Value", "Name", "所有状态")
            </td>
        </tr>
        <tr>
            <th>
                @Html.LabelFor(model => model.IsEnable, "是否启用")
            </th>
            <td>
                @Html.MyNet().DropDownListFor(model => model.IsEnable,
                    new[]
                    {
                        new { Value = true, Name = "启用"},
                        new { Value = false, Name = "禁用"},
                    }, "Value", "Name", "所有状态")
            </td>
        </tr>
        @if (string.IsNullOrEmpty(Request["Application"]))
        {
            <tr>
                <th>
                    @Html.LabelFor(model => model.IsAdmin, "超级管理员")
                </th>
                <td>
                    @Html.MyNet().DropDownListFor(model => model.IsAdmin,
                    new[]
                    {
                        new { Value = true, Name = "是"},
                        new { Value = false, Name = "不是"},
                    }, "Value", "Name", "所有类型")
                </td>
            </tr>
        }
        @if (string.IsNullOrEmpty(Request["Application"]))
        {
            <tr>
                <th>
                    @Html.LabelFor(model => model.Application, "应用")
                </th>
                <td>
                    @Html.MyNet().DropDownListFor(model => model.Application, Url.Action("Read", "Application"), "Key", "Name", "所有应用")
                </td>
            </tr>
        }
        else
        {
            Model.Application = Request["Application"];
            @Html.HiddenFor(model => model.Application)
        }
    </table>
}
